﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Photo.RU" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register TagPrefix="Custom" Namespace="ImageTable" Assembly = "ImageTable" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">   
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <asp:HyperLink ID="LinkToAlbumCreator" runat="server" meta:resourcekey="LinkToImageUploader"
            SkinID="create"></asp:HyperLink>
        <asp:Image ID="Image1" runat="server" Height="20px" 
            ImageUrl="~/App_Themes/photoru/ButtonImages/add.png" Width="20px" />
    </div>

    <div class="rightAlignment">
        <asp:TextBox ID="txtBoxSearch" runat="server" CssClass="txtboxsearch"></asp:TextBox>
        <asp:Button ID="btnSearch" runat="server" Text="Search" 
            meta:resourcekey="btnSearch" onclick="btnSearch_Click"/>
        &nbsp;&nbsp;       
        <asp:Label ID="lblShow" runat="server" meta:resourcekey="lblShow" 
            SkinID="labelauthor" Text="Albums on page:"></asp:Label>
        <asp:DropDownList ID="lstPageSize" runat="server" AutoPostBack="True" 
            onselectedindexchanged="lstPageSize_SelectedIndexChanged">
            <asp:ListItem Selected="True">5</asp:ListItem>
            <asp:ListItem>10</asp:ListItem>
            <asp:ListItem>20</asp:ListItem>
        </asp:DropDownList>
        <br />
    </div>

    <div class="leftAlignment">
    <asp:Button ID="btnBack" runat="server" Text="< Back" meta:resourcekey="btnBack" 
            Visible="False" onclick="btnBack_Click"/>
    </div>

    <div class="centerAlignment">

        <asp:GridView ID="gv" Runat="server" 
        AllowPaging="True"
        PageSize="5"
        AllowSorting="True"
        AutoGenerateColumns="False" 
        onpageindexchanging="gv_PageIndexChanging"
        CssClass="mGrid"  
        PagerStyle-CssClass="pgr"  
        AlternatingRowStyle-CssClass="alt" 
        onsorting="gv_Sorting"
        EmptyDataText="No Items to view"
        meta:resourcekey="gv">
          <Columns>
            <asp:HyperLinkField HeaderText="Title" DataTextField="Name" DataNavigateUrlFields="Url" HeaderStyle-ForeColor="White"
             SortExpression="name" meta:resourcekey="gvtitle"></asp:HyperLinkField>

            <asp:BoundField HeaderText="Date" DataField="Date" DataFormatString="{0:d}" SortExpression="date" meta:resourcekey="gvdate" HeaderStyle-ForeColor="White"></asp:BoundField>
            <asp:BoundField HeaderText="Author" DataField="Author" SortExpression="author" meta:resourcekey="gvauthor" HeaderStyle-ForeColor="White"></asp:BoundField>

            <asp:TemplateField>
            <ItemTemplate>
            <div class="leftAlignment">
            <style>.thumb80 img { height:75px; width:105px}</style>
                <asp:HyperLink CssClass="thumb80" runat="server" ImageUrl='<%# Eval("ImagesUrls[0]") %>' NavigateUrl='<%# Eval("Url") %>'></asp:HyperLink>
                <asp:HyperLink CssClass="thumb80" runat="server" ImageUrl='<%# Eval("ImagesUrls[1]") %>' NavigateUrl='<%# Eval("Url") %>'></asp:HyperLink>
                <asp:HyperLink CssClass="thumb80" runat="server" ImageUrl='<%# Eval("ImagesUrls[2]") %>' NavigateUrl='<%# Eval("Url") %>'></asp:HyperLink>
                <asp:HyperLink CssClass="thumb80" runat="server" ImageUrl='<%# Eval("ImagesUrls[3]") %>' NavigateUrl='<%# Eval("Url") %>'></asp:HyperLink>
                <asp:HyperLink CssClass="thumb80" runat="server" ImageUrl='<%# Eval("ImagesUrls[4]") %>' NavigateUrl='<%# Eval("Url") %>'></asp:HyperLink>
            </div>
            </ItemTemplate>
            </asp:TemplateField>

          </Columns>

        </asp:GridView>

    </div>
    </asp:Content>

